<template>
    <div>
        测试组件1
    </div>
    <button @click="sendToTwo">向test2发送数据</button>
</template>

<script setup>
import { emitter } from '@/utils/bus.js'

const sendToTwo = () => {
    emitter.emit('ok', { a: 8888 })
}

</script>

<style lang="scss" scoped></style>